Skip to content

feat(devspace): grounds devspace generate <component>#28

Merged
hbrombeer merged 1 commit intomainfrom
feat/devspace-generate
May 3, 2026
Merged

feat(devspace): grounds devspace generate <component>#28
hbrombeer merged 1 commit intomainfrom
feat/devspace-generate

Conversation

@hbrombeer
Copy link
Copy Markdown
Member

Summary

Wires forge's `POST /v1/devspace/generate` into the CLI so engineers can render a substituted `devspace.yaml` without copying + hand-editing the upstream template.

```sh
grounds devspace generate plugin-social --bundle 0.4.0 --override ./me.yaml
grounds devspace generate plugin-social --override ./me.yaml # bundle ref read from file
grounds devspace generate plugin-social --bundle main # no override
grounds devspace generate plugin-social --bundle 0.4.0 --output - # stdout
```

Behaviour

  • `--bundle` on the command line wins over the override file's `bundle:` field
  • The per-component override block is lifted from the override file and passed through as opaque JSON — forge owns the union schema (image / gradle-local / enabled)
  • Output defaults to `./devspace.yaml`; `--output -` writes to stdout
  • New `devspace` cobra group anchors future subcommands

Test plan

  • `go vet ./...`
  • `go test ./cmd/grounds/commands/devspace/... ./internal/api/...`
  • 6 unit tests for `loadGenerateInputs` (file + flag precedence, missing inputs, component-not-in-file)
  • `grounds devspace generate --help` looks right
  • Live exercise once forge#108 is deployed

Pairs with

🤖 Generated with Claude Code

Wires forge's POST /v1/devspace/generate (forge#108) into the CLI so
engineers can render a substituted devspace.yaml without copying +
hand-editing the upstream template:

  grounds devspace generate plugin-social --bundle 0.4.0 --override ./me.yaml
  grounds devspace generate plugin-social --override ./me.yaml      # bundle ref from file
  grounds devspace generate plugin-social --bundle main             # no override

The override file is the same shape `cluster up --override` expects;
the per-component block is lifted and passed through as opaque JSON
(forge owns the union schema). --bundle on the command line wins
over the override file's `bundle:` field. Output goes to
`./devspace.yaml` by default, `--output -` writes to stdout.

New `devspace` cobra group anchors future subcommands (likely
`devspace render` for offline-only template inspection, or a `devspace
sync` wrapper that picks the right context). For now, just `generate`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hbrombeer hbrombeer merged commit 82ba13a into main May 3, 2026
3 of 4 checks passed
@hbrombeer hbrombeer deleted the feat/devspace-generate branch May 3, 2026 19:59
hbrombeer added a commit that referenced this pull request May 4, 2026
The self-hosted Linux runner that ci.yml + release.yml depend on has
been offline / not picking up jobs since the last #29 push. Three
release-creating push-events are queued behind it: the cluster up
--bundle, devspace generate, and bundle list/show merges (PRs #27 +
#28 + #29) → no v0.1.12 tag, no goreleaser run, no published
binaries.

Switch all self-hosted runs-on to ubuntu-latest so the queue drains
and the new CLI surface ships. Public-repo Actions minutes on
GitHub-hosted runners are free; the self-hosted setup can be
reintroduced once it's healthy.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant